Skip to content

Draw ground still to dig beyond the cut; make the 4D back buttons step back - #2

Merged
BrandonLewis merged 9 commits into
mainfrom
ccr-efb0d0ab-y07neu
Nov 5, 2026
Merged

BrandonLewis merged 9 commits into
mainfrom
ccr-efb0d0ab-y07neu

Conversation

@BrandonLewis

@BrandonLewis BrandonLewis commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Summary

1. Ground still to dig draws beyond the cut (port from BrandonLewis/BIMForge#10). This fixes the finding left open in the review of #1, on _drawn in developed.py. Before the dig date:

  • the edges beyond a section showed the ground with its hole already dug;
  • a ground solid wholly behind the plane that its cut removes entirely vanished.

The fix: when every void of a host is still to dig, the host is drawn beyond the cut as its uncut shape, in place of its voided body. No 3D boolean is needed. A host with some voids already dug draws as before. A host that isn't standing at the date (placed later, or already removed) restores nothing, which addresses the Copilot finding on this PR. developed.py again matches BIMForge's copy, apart from the module-path wording.

2. The 4D back buttons step back. In the section panel, the date-step buttons each set only one of the operator's event and days properties. Blender gives an operator's unset, saved properties their last-used values, so after next event the −1 day and −7 day buttons ran with event = +1 and jumped forward to the next event. Both properties are now SKIP_SAVE, and every button sets both.

The Blender viewport otherwise is unchanged. It shows Bonsai's meshes, not developed.py.

Test plan

  • test_ground_still_to_dig_draws_beyond_the_cut fails on main (0 == 104) and passes here. It also covers ground placed after the view date.
  • test_the_date_filter_hides_what_is_not_built_and_skips_its_cut now asserts both step properties are skip-save, and fails without the fix. A scripted bpy.ops call doesn't inherit last-used values, so the property flag is what the test checks.
  • Full suite with bpy 5.2.3 and bimforge 0.1.100: 66 passed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu

BrandonLewis and others added 6 commits November 5, 2026 14:56
Before its dig, a hosted cut restores only its host's ground: the section
fill is clipped to the host's uncut section (developed / cross sections,
and the Blender add-on, whose Solid fill is clipped too), so a cut reaching
past grade no longer fills air. Drawing extents take in the limit lines.
developed.py matches BIMForge 0.1.100's copy; its new tests come along.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
When the plane cut a hosted cut but not its host, _clip_to_host returned
None and the caller filled the whole cut: soil drawn outside the ground,
in the pre-dig view and in Solid mode. Return no rings there, as the DXF
path (developed._cut_into) already skips a Restore with no host region.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Before the dig, the edges beyond a section showed the ground with its hole
already dug, and a ground solid wholly behind the plane that its cut
removes vanished. A host whose every void is still to dig is now drawn
beyond the cut as its uncut shape, in place of its voided body. No 3D
boolean. Raised in the review of #1.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Copilot AI balanced review requested due to automatic review settings November 5, 2026 15:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The whole-Clip path bypasses the host’s standing-state filter, making unbuilt or already removed hosts visible when all excavations remain undug.

1 open issue
What changed in this PR

Ports BIMForge’s pre-dig ground visibility fix, extending the restoration work from PR #1 to edges beyond section and elevation planes.

Changes:

  • Draws hosts uncut beyond the plane when all their voids are still undug, leaving mixed dug/undug hosts unchanged.
  • Adds a regression test for fully excavated ground lying beyond the section plane.
  • Documents the fix in the changelog; Blender viewport behavior is unchanged.
File Description
tests/​test_developed.py Adds optional fixture spans and tests beyond-cut visibility before and after excavation.
src/​ifcsection/​developed.py Tracks voided hosts and selects uncut replacements for beyond-cut drawing.
CHANGELOG.md Documents the pre-dig visibility fix and its scope.

Review effort: Balanced

Comment thread src/ifcsection/developed.py Resolved
BrandonLewis and others added 2 commits November 5, 2026 15:50
Port of the BIMForge fix: an undug cut restored ground, and a whole Clip
drew the host beyond the cut, even when the host's own schedule had it
not yet placed or already removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
Each date-step button set only one of `event` / `days`, and Blender gives
an operator's unset, saved properties their last-used values: after "next
event", the -1 day and -7 day buttons ran with event=+1 and jumped forward
to the next event. Mark both SKIP_SAVE and set both on every button.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XRnqNmAEttrAq1w1dKrNCu
@BrandonLewis BrandonLewis changed the title Draw ground still to dig beyond the cut, uncut (port from BIMForge) Draw ground still to dig beyond the cut; make the 4D back buttons step back Nov 5, 2026
@BrandonLewis
BrandonLewis merged commit 3114687 into main Nov 5, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants